class Lesson < ActiveRecord::Base

  belongs_to :course
  has_many :tasks
  has_many :didatic_materials

  validates_presence_of :applied_at
  validates_presence_of :title
  validates_presence_of :description
  validates_presence_of :course
  
  validates_uniqueness_of :title, :scope => [:title, :applied_at, :course_id]

  
  
end
